package cn.bmbanjia.zebra2024.apps.base.laddieAppraise.service.impl;

import cn.bmbanjia.zebra2024.apps.clewAndroid.clew.req.UploadLaddieAppraiseReq;
import cn.bmbanjia.zebra2024.frame.resp.Resp;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import cn.bmbanjia.zebra2024.apps.base.laddieAppraise.entity.LaddieAppraise;
import cn.bmbanjia.zebra2024.apps.base.laddieAppraise.mapper.LaddieAppraiseMapper;
import cn.bmbanjia.zebra2024.apps.base.laddieAppraise.service.ILaddieAppraiseService;
import org.springframework.stereotype.Service;

/**
 * 商务评价小哥 服务层实现。
 *
 * @author fugui
 * @since 2024-08-16
 */
@Service
public class LaddieAppraiseServiceImpl extends ServiceImpl<LaddieAppraiseMapper, LaddieAppraise> implements ILaddieAppraiseService {

    @Override
    public Resp<Void> uploadLaddieAppraise(UploadLaddieAppraiseReq req) {

        LaddieAppraise la = LaddieAppraise.builder()
                .orderId(req.getOrderId())
                .laddieId(req.getLeaderId())
                .laddieName(req.getLeaderName())
                .score(req.getScore())
                .appraiseRemark(req.getAppraiseRemark())
                .build();
        save(la);

        return Resp.success();
    }

}
